<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>店面自营护理管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		.ui-page .ui-content .ui-input-text {
   			height : 89px;
		}
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#name").focus();
			$("#inputForm").validate({
				rules:{
	                "price": "ifMoney"
	            },
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			setTimeout(function () {
			    $('.foo').css({
			        'height': '100px'
			    });
			}, 100);
		});
	</script>
</head>
<body>
	<form:form id="inputForm" class="form-input" modelAttribute="storeSelfCare" action="${ctx}/base/storeSelfCare/save" method="post">
		<form:hidden path="id"/>
		<div class="icon-buttons">
			<a href="${ctx}/base/storeSelfCare/list" data-icon="back" data-iconpos="notext" data-role="button" data-inline="true">返回</a>
			<input type="submit" data-icon="check" data-iconpos="notext" value="保 存" data-inline="true"/>
		</div>
		<tags:message content="${message}"/>
		<div data-role="fieldcontain">
   			<label for="name">护理名称:</label>
    		<form:input path="name" class="required" />
		</div>
		<div data-role="fieldcontain">
			<label for="duration">护理周期:</label>
			<form:select path="duration" data-native-menu="false" items="${fns:getDictMap('care_duration')}" class="required"></form:select>
		</div>
		<div data-role="fieldcontain">
   			<label for="times">护理次数(次):</label>
    		<form:input type="number" path="times" class="required digits" />
		</div>
		<div data-role="fieldcontain">
   			<label for="price">标准参考价(元):</label>
    		<form:input path="price" class="required" />
		</div>
		<div data-role="fieldcontain">
			<label for="type">护理类型:</label>
			<form:select path="type" data-native-menu="false" items="${fns:getDictMap('care_type')}" class="required"></form:select>
		</div>
		<div data-role="fieldcontain">
			<label for="description">护理描述:</label>
			<form:textarea class="foo" path="description" htmlEscape="false"/>
		</div>
	</form:form>
</body>
</html>
